var map;
var marker = null;
var thisLatLng = null;

$(document).ready(function() {
	
	var myOptions = {
	    zoom: 16,
	    mapTypeControl: false,
	    navigationControl: true,
	    navigationControlOptions: {
	        style: google.maps.NavigationControlStyle.SMALL
	    },
	    streetViewControl: false,
	    mapTypeId: google.maps.MapTypeId.ROADMAP
	};
		
	map = new google.maps.Map(document.getElementById("map"), myOptions);
	
	var latitude = $('#lat').val();
	var longitude = $('#lng').val();
		
	setupMarker(latitude, longitude);
	initialLocation = new google.maps.LatLng(latitude, longitude);
	map.setCenter(initialLocation);
});

function setupMarker(latitude, longitude) {
	
	thisLatLng = new google.maps.LatLng(latitude, longitude);
	
	marker = new google.maps.Marker({
        position: thisLatLng, 
        map: map,
        draggable: false,
        title:"This sign!"
    });		
}